/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Thread;

import vectors.VectorIn;

/**
 *
 * @author Кирилл
 */
public class ThreadForRead extends Thread{
    
    private VectorIn vector;

    public ThreadForRead(VectorIn vector) throws CloneNotSupportedException {
        this.vector = (VectorIn) vector.clone();
    }
    private void read() {
        for (int i = 0; i < vector.getSize(); i++) {
            //vector.getElement(i);
            System.out.println("Read " + vector.getElement(i) + " from position " + i + "");

        }
    }
    public void run(){
        read();
    }
}
